<template>
	<view class="main">
		<u-navbar
		title="账户设置"
		title-size="34"
		back-icon-color="#ffffff"
		title-color="#ffffff"
		:border-bottom="false"
		:background="background">
		</u-navbar>
		<view class="content">
			<view class="item">
				<view class="title">推送设置</view>
				<view class="right">
					<u-switch v-model="checked" size="38"></u-switch>
				</view>
			</view>
			<view class="item">
				<view class="title">勿扰模式(23点-9点不接受推送)</view>
				<view class="right">
					<u-switch v-model="checked" size="38"></u-switch>
				</view>
			</view>
		</view>
		<view class="content">
			<view class="item" @tap="toPage('/pages/Mine/changePassword')">
				<view class="title">账户与安全</view>
				<view class="right">
					<u-icon name="arrow-right" color="#C7C7C7" size="28"></u-icon>
				</view>
			</view>
			<view class="item">
				<view class="title">当前版本</view>
				<view class="right">
					<text>v1.0</text>
					<u-icon name="arrow-right" color="#C7C7C7" size="28"></u-icon>
				</view>
			</view>
		</view>
		<view class="content">
			<view class="item">
				<view class="title">关于我们</view>
				<view class="right">
					<u-icon name="arrow-right" color="#C7C7C7" size="28"></u-icon>
				</view>
			</view>
			<view class="item">
				<view class="title">隐私政策和用户协议</view>
				<view class="right">
					<u-icon name="arrow-right" color="#C7C7C7" size="28"></u-icon>
				</view>
			</view>
		</view>
		<button type="default" class="quit">退出登录</button>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				background: {
					backgroundColor:"#4A90E2"
				},
				checked:false
			}
		},
		onLoad() {
			
		},
		onShow() {
			
		},
		onPullDownRefresh() {
		    console.log('refresh');
		    setTimeout(function () {
		        uni.stopPullDownRefresh();
		    }, 1000);
		},
		methods: {
			toPage(url,islogin=false){
				if(islogin){
					uni.navigateTo({
					    url: '/pages/Login/index'
					});
					return
				}
				uni.navigateTo({
				    url: url
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		min-height: 100vh;
		background-color: #f9f9f9;
		.content{
			background-color: #FFFFFF;
			padding: 0 30rpx;
			.item{
				padding: 30rpx 0;
				border-bottom: 1px solid #E6E6E6;
				display: flex;
				align-items: center;
				justify-content: space-between;
				&:last-child{
					border-bottom: 0;
				}
				.title{
					font-size: 28rpx;
					font-weight: 400;
					color: #333333;
					line-height: 40rpx;
				}
				.right{
					text{
						font-size: 28rpx;
						font-weight: 400;
						color: #888888;
						line-height: 28rpx;
						margin-right: 10rpx;
					}
				}
			}
			margin-bottom: 20rpx;
		}
		.quit{
			width: calc(100% - 60rpx);
			height: 100rpx;
			background: #4A90E2;
			border-radius: 50rpx;
			font-size: 34rpx;
			font-weight: 400;
			color: #FFFFFF;
			line-height: 100rpx;
			position:fixed;
			left: 30rpx;
			bottom: 46rpx;
			z-index: 99;
			&::after{
				border: 0;
			}
		}
	}
</style>
